-- GENERATED SPELL FOR [Magram Stormer] --


function spell0_4642(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(6535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4642', 18000, 1)
end

function spell1_4642(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(8788,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4642', 0, 1)
end

function Sorts_4642(pUnit, Event)
local choix_sorts_4642 = math.random(0, 1)
if choix_sorts_4642 == 0 then
pUnit:RegisterEvent('spell0_4642', 1, 1)
end
if choix_sorts_4642 == 1 then
pUnit:RegisterEvent('spell1_4642', 1, 1)
end
end

function mob4642_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4642', math.random(1500, 3000), 1)
end

function mob4642_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4642_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4642_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4642, 1, 'mob4642_Action')
RegisterUnitEvent(4642, 2, 'mob4642_Leave')
RegisterUnitEvent(4642, 3, 'mob4642_Kill')
RegisterUnitEvent(4642, 4, 'mob4642_Die')
